<?php

$str =<<<xbs
 <a href="https://www.lagou.com/zhaopin/qukuailian/" data-lg-tj-id="4A00" data-lg-tj-no="0004" data-lg-tj-cid="idnull">区块链</a>
                    
                                                
                                                
                    <a href="https://www.lagou.com/zhaopin/Android/" data-lg-tj-id="4A00" data-lg-tj-no="0005" data-lg-tj-cid="idnull">Android</a>
                    
                                                
                                                
                    <a href="https://www.lagou.com/zhaopin/iOS/" data-lg-tj-id="4A00" data-lg-tj-no="0006" data-lg-tj-cid="idnull">iOS</a>
                    
                                                
                                                
                    <a href="https://www.lagou.com/zhaopin/shujuwajue/" data-lg-tj-id="4A00" data-lg-tj-no="0007" data-lg-tj-cid="idnull">数据挖掘</a>
                    
                                                
                                                
                    <a href="https://www.lagou.com/zhaopin/shenduxuexi/" data-lg-tj-id="4A00" data-lg-tj-no="0008" data-lg-tj-cid="idnull">深度学习</a>
xbs;


$preg = "/<a href=\"(.+?)\" data-lg-tj-id=\"4A00\" data-lg-tj-no=\".+?\" data-lg-tj-cid=\"idnull\">(.+?)<\/a>/s";

$c = preg_match_all($preg,$str,$out);

var_dump($c);

var_dump($out);

